<body>
<p>
Experimental functions for tree manipulation, package may be dropped.
</p>
<p>
Why this needs improving.
To ensure correctness the current algorithm will after
rewriting a node, check all of its children again for
</body>
